//
//  STSureOrderController.m
//  CuiBoStore
//
//  Created by 崔博 on 16/12/15.
//  Copyright © 2016年 崔博. All rights reserved.
//

#import "STSureOrderController.h"
#import "STSureOrderCell.h"
@interface STSureOrderController ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *orderTableView;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@end
static NSString *cellID = @"STSureOrderCell";
@implementation STSureOrderController

- (void)viewDidLoad {
    [super viewDidLoad];
    // table
    [self setUI];
    _priceLabel.text = [NSString stringWithFormat:@"￥%@",self.sureOrderModel.GoodsPrice];
}
#pragma Mark - event
// 基本属性赋值
- (void)setUI
{
    _orderTableView.backgroundColor = BACKGROUND_COLOR;
    _orderTableView.rowHeight = 100;
    _orderTableView.tableFooterView = [[UIView alloc] init];
    REGISNIBCELL(_orderTableView, @"STSureOrderCell", cellID);
}
// 调用支付宝
- (IBAction)gotoPayMoney:(id)sender {
    
}
#pragma mark - delegate

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.sureOrderModel.GoodsList.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    STSureOrderCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    cell.listModel = self.sureOrderModel.GoodsList[indexPath.row];
    return cell;
}

@end
